<?php
 

/* Check if this is a valid include */
if (!defined('IN_SCRIPT')) {die($hdlang['attempt']);}
?>

<div align="center">
<center>
<table border="0" width="750" cellspacing="1" cellpadding="5" class="white">
<tr>
<td valign="top" width="50%">
<form action="show_requests.php" method="GET">
<h3 align="center"><?php echo $hdlang['show_requests']; ?>:</h3>

<table border="0" cellpadding="3" cellspacing="0" width="100%">
<tr>
<td valign="top"><b><?php echo $hdlang['status']; ?></b>: &nbsp; </td>
<td>

<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="50%"><label><input type="radio" name="status" value="0" checked> <font class="open"><?php echo $hdlang['open']; ?></font></label></td>
<td width="50%"><label><input type="radio" name="status" value="1"> <font class="waitingreply"><?php echo $hdlang['wait_reply']; ?></font></label></td>
</tr>
<tr>
<td width="50%"><label><input type="radio" name="status" value="2"> <font class="replied"><?php echo $hdlang['replied']; ?></font></label></td>
<td width="50%"><label><input type="radio" name="status" value="6"> <font class="replied"><?php echo $hdlang['all_not_closed']; ?></font></label></td>
</tr>
<tr>
<td width="50%"><label><input type="radio" name="status" value="3"> <font class="resolved"><?php echo $hdlang['closed']; ?></label></td>
<td width="50%"><label><input type="radio" name="status" value="4"> <?php echo $hdlang['any_status']; ?></label></td>
</tr>
</table>

</td>
</tr>
<tr>
<td class="white" valign="top"><b><?php echo $hdlang['sort_by']; ?></b>: &nbsp; </td>
<td class="white">

<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="50%" class="white"><label><input type="radio" name="sort" value="priority" checked> <?php echo $hdlang['priority']; ?></label></td>
<td width="50%" class="white"><label><input type="radio" name="sort" value="lastchange"> <?php echo $hdlang['last_update']; ?></label></td>
</tr>
<tr>
<td width="50%" class="white"><label><input type="radio" name="sort" value="name"> <?php echo $hdlang['name']; ?></label></td>
<td width="50%" class="white"><label><input type="radio" name="sort" value="subject"> <?php echo $hdlang['subject']; ?></label></td>
</tr>
<tr>
<td width="50%" class="white"><label><input type="radio" name="sort" value="status"> <?php echo $hdlang['status']; ?></label></td>
<td width="50%" class="white">&nbsp;</td>
</tr>
</table>

</td>
</tr>
<tr>
<td valign="center"><b><?php echo $hdlang['residence']; ?></b>: &nbsp; </td>
<td><select name="residence">
<option value="0"><?php echo $hdlang['any_cat']; ?></option>
<?php
$sql_private = "SELECT * FROM `hd_residences` WHERE ";
$sql_private .= hd_myResidences('id');
$sql_private .= ' ORDER BY `cat_order` ASC';

$result = hd_dbQuery($sql_private) or hd_error("$hdlang[cant_sql]: $sql</p><p>$hdlang[mysql_said]:<br>".mysql_error()."</p><p>$hdlang[contact_webmsater] $hd_settings[webmaster_mail]");
while ($row=hd_dbFetchAssoc($result))
{
    echo '<option value="'.$row['id'].'">'.$row['name'].'</option>';
}

?>
</select></td>
</tr>
<tr>
<td class="white"><b><?php echo $hdlang['order']; ?></b>: &nbsp; </td>
<td class="white"><label><input type="radio" name="asc" value="1" checked> <?php echo $hdlang['ascending']; ?></label> |
<label><input type="radio" name="asc" value="0"> <?php echo $hdlang['descending']; ?></label></td>
</tr>
<tr>
<td><b><?php echo $hdlang['display']; ?></b>: &nbsp; </td>
<td><input type="text" name="limit" value="<?php echo $hd_settings['max_listings']; ?>" size="4"> <?php echo $hdlang['requests_page']; ?></td>
</tr>
</table>

<p><label><input type="checkbox" name="archive" value="1"> <?php echo $hdlang['disp_only_archived']; ?></label></p>

<p align="center"><input type="submit" value="<?php echo $hdlang['show_requests']; ?>" class="button"></p>
</form>
</td>
<td valign="top" width="50%">
<form action="find_requests.php" method="GET" name="findby">
<h3 align="center"><?php echo $hdlang['find_request_by']; ?>:</h3>

<table border="0" cellpadding="3" cellspacing="0" width="100%">
<tr>
<td><label><input type="radio" name="what" value="requestid" checked> <b><?php echo $hdlang['trackID']; ?></b></label>: &nbsp; </td>
<td><input type="text" name="requestid" size="12" maxlength="10" onFocus="Javascript:document.findby.what[0].checked=true;"></td>
</tr>
<tr>
<td class="white"><label><input type="radio" name="what" value="name"> <b><?php echo $hdlang['name']; ?></b></label>: &nbsp; </td>
<td class="white"><input type="text" name="name" size="20" onFocus="Javascript:document.findby.what[1].checked=true;"></td>
</tr>
<tr>
<td><label><input type="radio" name="what" value="dt"> <b><?php echo $hdlang['date_posted']; ?></b></label>: &nbsp; </td>
<td><input type="text" name="dt" size="12" maxlength="10" value="<?php echo $hdlang['yyyy_mm_dd']; ?>" onFocus="Javascript:document.findby.what[2].checked=true;"></td>
</tr>
<tr>
<td class="white"><label><input type="radio" name="what" value="subject"> <b><?php echo $hdlang['subject']; ?></b></label>: &nbsp; </td>
<td class="white"><input type="text" name="subject" size="30" onFocus="Javascript:document.findby.what[3].checked=true;"></td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td><b><?php echo $hdlang['display']; ?></b>: &nbsp; </td>
<td><input type="text" name="limit" value="<?php echo $hd_settings['max_listings']; ?>" size="4"> <?php echo $hdlang['results_page']; ?></td>
</tr>
</table>

<p><label><input type="checkbox" name="archive" value="1"> <?php echo $hdlang['search_only_archived']; ?></label></p>

<p align="center"><input type="submit" value="<?php echo $hdlang['find_request']; ?>" class="button"></p>
</form>
</td>
</tr>
</table>
</center>
</div>
